# coding:utf-8

import re


def had_number(data):
    result = re.findall('\d', data)
    if len(result) != 0:
        return True
    return False


def remove_number(data):
    result = re.findall('\D', data)
    print(result)
    return ''.join(result)


def startswith(sub, data):
    _sub = '\A%s' % sub
    result = re.findall(_sub, data)
    for i in result:
        return True
    return False


def endswith(sub, data):
    _sub = '%s\Z' % sub
    result = re.findall(_sub, data)
    if len(result) != 0:
        return True
    else:
        return False


if __name__ == '__main__':
    data = 'hello i am alanshelby, i am 28'
    result = endswith('28', data)
    print(result)

    data = 'i dont want to be your entire world, i want to say "!@#$%~!"'
    result = re.findall('\"(.*)\"', data)
    print(result)
